s = "level"
is_palindrome = s == s[::-1]  # s[::-1] 生成反转字符串
print(is_palindrome)  # 输出: True